
################################################################################

#APP COMPILE
MPI_CC=$(CROSS_COMPILE)gcc
MPI_CXX=$(CROSS_COMPILE)g++
MPI_AR=$(CROSS_COMPILE)ar
MPI_LD=$(CROSS_COMPILE)ld
MPI_STRIP=$(CROSS_COMPILE)strip
MPI_RM=$(RM)
MPI_CP=$(CP)
MPI_MV=$(MV)

export MPI_CC
export MPI_CXX
export MPI_AR
export MPI_LD
export MPI_STRIP
export MPI_RM
export MPI_CP
export MPI_MV

CURR_SVN_VERSION=$(patsubst %M,%,$(shell svnversion))

export CURR_SVN_VERSION

SRC_TOP_DIR := $(shell pwd)

#vin device头文件
export MPI_VI_DEVICE_H="${SRC_TOP_DIR}/device-driver/vin/inc"

#vout device头文件
export MPI_VO_DEVICE_H="${SRC_TOP_DIR}/device-driver/vout/inc"

#Mdi头文件
export MPI_MDI_DEVICE_H="${SRC_TOP_DIR}/mpi/mpi-src/mdi-common"

#mpi头文件
export MPI_INCLUDE_H="${SRC_TOP_DIR}/mpi/mpi-src/mpi-app/inc"

#LibImage路径
export MPI_LIBIMAGE="${SRC_TOP_DIR}/mpi/mpi-isp"

#G_TEST专用
export GTEST_MPI_INCLUDE_H="${SRC_TOP_DIR}/mpi/mpi-src/mpi-app/src"
export GTEST_MPI_LIB="${SRC_TOP_DIR}/mpi/mpi-src/mpi-app/lib"
export GTEST_INCLUDE_H="${SRC_TOP_DIR}/mpi/mpi-gtest/inc"
export GTEST_LIB="${SRC_TOP_DIR}/mpi/mpi-gtest/lib"

DIRECTORIES += device-driver
DIRECTORIES += mpi
SUBDIR = .
################################################################################
# define user targets
################################################################################

MPI_KERNEL_VERSION = $(MPIKERNELVERSION)
export MPI_KERNEL_VERSION

default: build install

clean: $(DIRECTORIES:%=subdir-clean-%)

build:
	for dir in $(DIRECTORIES);do $(MAKE) -C $$dir;done

install:

depend: 

all: clean install

subdir-build-%:
	@$(MAKE) -C $(@:subdir-build-%=%)

subdir-clean-%:
	@$(MAKE) -C $(@:subdir-clean-%=%) clean
